1. Field of the Invention
The present invention relates to an image processing device and method for performing white balancing on an image, a program therefor, and an imaging apparatus.
2. Description of the Related Art
White balance (or white balancing) is a process of adjusting tints of an image captured by an imaging apparatus to adjust the color balance of the image depending on a change of a light source. Related-art white balances are broadly classified into two kinds of methods, namely, a first method of imaging a white subject before shooting and performing adjustment and a second method of imaging an actual subject during shooting and performing adjustment.
According to the first method, the adjustment is performed so that the balance of color components (R, G, and B) is 1:1:1 for processing for adjustment.
According to the second method, the presence or absence of the influence of a light source is determined on the basis of results of integration for the respective color components in an area obtained from an imaging signal during shooting. When the presence of the influence of the light source is determined, gain adjustment is properly performed so as to match an estimated hue of the color source. When the absence of the influence of the light source is determined, it is determined that a subject itself has a color. Gain adjustment is not performed and the color of the subject is kept.
According to white balancing disclosed in Japanese Unexamined Patent Application Publication No. 2004-320671, in order to adjust a color to its original color with reference to the influence of a light source, a determination is made using a “pull-in frame” defined by the color temperature of the light source as to whether to keep the original color of a subject which is not affected by the light source. A color component affected by the light source is removed. According to such a technique disclosed in Japanese Unexamined Patent Application Publication No. 2004-320671, a pull-in frame is set on the basis of the color temperatures of daylight and fluorescent light assumed as general light sources, the color components of a light source are calculated based on the proportion of the color components within a blackbody radiation curve, and when the color components exist in the pull-in frame, a video image is adjusted so that the color components becomes closer to the blackbody radiation curve.